package com.example.workshop.lesson11;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Component
public class ContentBasedFilter implements Filter {

	private Logger logger=LoggerFactory.getLogger(this.getClass());

	public ContentBasedFilter() {
		super();
		logger.info("In ContentBasedFilter constructor method");
	}
	@PostConstruct
	private void postConstruct(){
		logger.info("In ContentBasedFilter postConstruct method");
	}
	@PreDestroy
	private void preDestroy(){
		logger.info("In ContentBasedFilter preDestroy method");
	}

	//getRecommendations将一部电影作为输入，并返回类似电影的列表。
	public String[] getRecommendations(String movie) {


		//基于内容的过滤器结果
		return new String[] {"Happy Feet","Ice Age","Shark Tale"};
		}

}
